package GUI.menuWin;

import game.GameSettingsOld;

import java.awt.Color;
import java.awt.Image;
import java.awt.Toolkit;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.Random;

import javax.imageio.ImageIO;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;

import GUI.CardImages;

//TODO it is just a test logo
@SuppressWarnings("serial")
public class GameLogoPanel extends JPanel{
	private JButton logoButton;
	
	public GameLogoPanel () {
		super();
		JPanel somePanel = new JPanel();
		somePanel.setBorder(new TitledBorder("Makao!"));
		((TitledBorder) somePanel.getBorder()).setTitleColor(Color.WHITE);
		somePanel.setBackground(new Color(0, 77, 0));
		add(somePanel);
		
		logoButton = new JButton();
		logoButton.setBorder(BorderFactory.createEmptyBorder());
		logoButton.setContentAreaFilled(false);
		ImageIcon img = CardImages.getInstance().getII("/carddeck/conv/resizedH/"+new Random().nextInt(53));
		logoButton.setIcon(img);
		somePanel.add(logoButton);
	}
	
	public void getNewImage() {
		ImageIcon img;
		img = CardImages.getInstance().getII("/carddeck/conv/resizedH/"+new Random().nextInt(53));
		logoButton.setIcon(img);
	}
}
